package com.andy.eqm.server.dto;

import com.andy.eqm.server.game.GameUser;

import io.netty.buffer.ByteBuf;

/**
 * 玩家金币变化
 * @author cuiwm
 */
public class UserCoinMessage extends BaseMessage{
	
    private GameUser user;
    
    public UserCoinMessage(GameUser user) {
    	this.user = user;
	}

	@Override
	public void writeBody(ByteBuf buf) {
		buf.writeInt(user.getId().intValue());
		buf.writeLong(user.getGameInfo().getCoin());
	}


}